#pragma once

#include <memory>
#include "cyber/plugin_manager/plugin_manager.h"
#include "modules/planning/planning_interface_base/scenario_base/scenario.h"
#include "modules/planning/scenarios/traffic_light_left_turn_waiting_zone/proto/traffic_light_left_turn_waiting_zone.pb.h"

namespace apollo {
namespace planning {

struct TrafficLightLeftTurnWaitingZoneContext : public ScenarioContext {
    TrafficLightLeftTurnWaitingZoneConfig scenario_config;
    std::string left_turn_traffic_light_id;
    std::string forward_traffic_light_id;
};

class TrafficLightLeftTurnWaitingZone : public apollo::planning::Scenario {
public:
    bool Init(std::shared_ptr<DependencyInjector> injector, const std::string& name);
    TrafficLightLeftTurnWaitingZoneContext* GetContext() override {
        return &context_;
    }
    bool IsTransferable(const Scenario* other_scenario, const Frame& frame);
    bool Exit(Frame* frame);
    bool Enter(Frame* frame);

private:
    TrafficLightLeftTurnWaitingZoneContext context_;
};

CYBER_PLUGIN_MANAGER_REGISTER_PLUGIN(apollo::planning::TrafficLightLeftTurnWaitingZone, apollo::planning::Scenario)

}  // namespace planning
}  // namespace apollo